//报销路由

const express = require('express')
const expressJoi = require('@escook/express-joi')
const reimbursement_schema = require('../schema/reimbursement')

const reimbursement_hanlder = require('../router_hanlder/reimbursement')


const router = express.Router()

//获取报账列表
router.get('/',expressJoi(reimbursement_schema.get_list),reimbursement_hanlder.getReimbursement)

//新增报账
router.post('/create',expressJoi(reimbursement_schema.create_list),reimbursement_hanlder.createReimbursement)

//修改报账
router.post('/update',expressJoi(reimbursement_schema.update_list),reimbursement_hanlder.updateReimbursement)

//删除报账
router.post('/delete',expressJoi(reimbursement_schema.delete_list),reimbursement_hanlder.deleteReimbursement)

//报账详情
router.get('/detail',expressJoi(reimbursement_schema.detail),reimbursement_hanlder.detail)

module.exports = router
